package com.qzsoft.system.modules.permission.rolebusiness.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.qzsoft.jeemis.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;


/**
 * 角色管理(SysRoleBusiness)表实体类
 *
 * @author sdmq
 * @since 2020-09-01 13:54:41
 */
@ApiModel(value = "角色管理")
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_role_business")
public class SysRoleBusinessEntity extends Model<SysRoleBusinessEntity> {
	private static final long serialVersionUID = 233908460327320089L;


	/**
	 *id主键
	 */
	@TableId(type = IdType.ASSIGN_UUID) //主键ID_WORKER策略
	@NotNull(message = "{id.require}", groups = UpdateGroup.class)
	@ApiModelProperty(value = "id主键")
	private String id;

	/**
	 *code编码
	 */
	@ApiModelProperty(value = "code三位步长")
	private String code;

	/**
	 *角色名称
	 */
	@ApiModelProperty(value = "角色名称")
	private String name;
	/**
	 *父节点
	 */
	@ApiModelProperty(value = "父节点")
	private String pid;
	/**
	 *0分组 1角色
	 */
	@ApiModelProperty(value = "1分组 0角色")
	private Boolean hasGroup;

	/**
	 *0分组 1角色
	 */
	@ApiModelProperty(value = "排序")
	private Long orderId;

	/**
	 *备注
	 */
	@ApiModelProperty(value = "备注")
	private String remark;
	/**
	 *是否系统内置角色
	 */
	@ApiModelProperty(value = "是否系统内置角色")
	private Boolean hasSystem;
	/**
	 *   是否删除
	 */
	@ApiModelProperty(value = "0不删除 1删除")
	private Boolean hasDelete;
	/**
	 *简拼
	 */
	@ApiModelProperty(value = "简拼")
	private String spell;
	/**
	 *拼音
	 */
	@ApiModelProperty(value = "拼音")
	private String pinyin;
	/**
	 *创建者
	 */
	@TableField(fill = FieldFill.INSERT)
	@ApiModelProperty(value = "创建者")
	private Long creator;
	/**
	 *创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@ApiModelProperty(value = "创建时间")
	private Date createDate;
	/**
	 *更新者
	 */
	@TableField(fill = FieldFill.UPDATE)
	@ApiModelProperty(value = "更新者")
	private Long updater;
	/**
	 *更新时间
	 */
	@TableField(fill = FieldFill.UPDATE)
	@ApiModelProperty(value = "更新时间")
	private Date updateDate;

	/**
	 * 获取主键值
	 *
	 * @return 主键值
	 */
	@Override
	protected Serializable pkVal() {
		return this.id;
	}
}